package a.e;

import a.j.g;
import a.j.pg;

import java.awt.*;
import java.awt.geom.Rectangle2D;

public class u
{
  public static byte a = 0;
  public static byte b = 1;
  public static byte c = 0;
  public static byte d = 1;
  public static byte e = 2;
  private byte f = a;
  private byte g = c;
  private int h = 500;
  private int i = 500;
  private int j = 15;
  private g k;
  private pg l;
  private double m = 1.0D;
  public static boolean n;
  
  public void a(pg parampg)
  {
    int i2 = e.b;
    int i1 = e.a;
    double d1 = e();
    double d2 = f();
    Point localPoint = parampg.R();
    double d3 = 1.0D;
    Object localObject1;
    Object localObject2;
    if (i2 == 0) {
      if (c() == a)
      {
        localObject1 = g();
        localObject2 = ((g)localObject1).d().getBounds2D();
        double d4 = b() / this.m;
        ((Rectangle2D)localObject2).setFrame(((Rectangle2D)localObject2).getX() - d4, ((Rectangle2D)localObject2).getY() - d4, ((Rectangle2D)localObject2).getWidth() + 2.0D * d4, ((Rectangle2D)localObject2).getHeight() + 2.0D * d4);
        if (i2 == 0)
        {
          if (d() == e)
          {
            d1 = d2 * ((Rectangle2D)localObject2).getWidth() / ((Rectangle2D)localObject2).getHeight();
            if (i2 != 0) {
              break label250;
            }
            if (i1 == 0) {
              break label213;
            }
          }
          if (i2 != 0) {}
        }
        else
        {
          if (d() != d) {
            break label200;
          }
          d2 = d1 * ((Rectangle2D)localObject2).getHeight() / ((Rectangle2D)localObject2).getWidth();
        }
        if (i2 == 0)
        {
          if (i1 != 0)
          {
            label200:
            d1 = ((Rectangle2D)localObject2).getWidth();
            d2 = ((Rectangle2D)localObject2).getHeight();
          }
          label213:
          d3 = d1 / ((Rectangle2D)localObject2).getWidth();
          localPoint = new Point((int)((Rectangle2D)localObject2).getX(), (int)((Rectangle2D)localObject2).getY());
          if (i2 != 0) {
            return;
          }
        }
      }
    }
    label250:
    if ((i1 != 0) && ((i2 != 0) || (c() == b)))
    {
      localObject1 = h();
      localObject2 = ((pg)localObject1).I();
      if (i2 == 0)
      {
        if (d() == e)
        {
          d1 = d2 * ((Dimension)localObject2).getWidth() / ((Dimension)localObject2).getHeight();
          if (i2 != 0) {
            break label381;
          }
          if (i1 == 0) {
            break label374;
          }
        }
        if (i2 != 0) {}
      }
      else
      {
        if (d() != d) {
          break label361;
        }
        d2 = d1 * ((Dimension)localObject2).getHeight() / ((Dimension)localObject2).getWidth();
        if (i2 != 0) {
          break label381;
        }
      }
      if (i1 != 0)
      {
        d1 = ((Dimension)localObject2).getWidth();
        d2 = ((Dimension)localObject2).getHeight();
      }
      localPoint = ((pg)localObject1).R();
      label381:
      d3 = ((pg)localObject1).M() * d1 / ((Dimension)localObject2).getWidth();
    }
    label361:
    label374:
    d1 *= this.m;
    d2 *= this.m;
    d3 *= this.m;
    parampg.b(d3);
    parampg.setSize((int)d1, (int)d2);
    parampg.b(localPoint.x, localPoint.y);
  }
  
  public void a(double paramDouble)
  {
    if (paramDouble <= 0.0D) {
      throw new IllegalArgumentException("Scale must be positive!");
    }
    this.m = paramDouble;
  }
  
  public double a()
  {
    return this.m;
  }
  
  public void a(int paramInt)
  {
    this.j = paramInt;
  }
  
  public int b()
  {
    return this.j;
  }
  
  public void a(byte paramByte)
  {
    this.f = paramByte;
  }
  
  public byte c()
  {
    return this.f;
  }
  
  public void b(byte paramByte)
  {
    this.g = paramByte;
  }
  
  public byte d()
  {
    return this.g;
  }
  
  public void b(int paramInt)
  {
    if (paramInt < 1) {
      throw new IllegalArgumentException("Width must be positive!");
    }
    this.h = paramInt;
  }
  
  public int e()
  {
    return this.h;
  }
  
  public void c(int paramInt)
  {
    if (paramInt < 1) {
      throw new IllegalArgumentException("Height must be positive!");
    }
    this.i = paramInt;
  }
  
  public int f()
  {
    return this.i;
  }
  
  public void b(pg parampg)
  {
    this.l = parampg;
  }
  
  public void a(g paramg)
  {
    this.k = paramg;
  }
  
  public g g()
  {
    return this.k;
  }
  
  public pg h()
  {
    return this.l;
  }
}



/* Location:           E:\idea\

 * Qualified Name:     a.e.u

 * JD-Core Version:    0.7.0.1

 */